package com.superquan.selfstudybootmybatis.utils.proxy.static_proxy;

/**
 * @program: self-study-bootmybatis
 * @ClassName AgencyTest
 * @description: 代理测试类
 * @author: zwq
 **/
public class StaticProxyTest {
    public static void main(String[] args) {
        //实例化userDao对象
        UserDao userDao = new UserDao();
        //实例化代理类
        UserDaoProxy userDaoProxy = new UserDaoProxy(userDao);
        //通过代理类操作userDao对象
        //在不修改UserDao接口类的情况下增加开启事务和关闭事务操作
        userDaoProxy.save();
    }
}
